package constructor06;
/*
* 构造方法之间的相互调用
*   只能通过this(参数)；来调用其他的构造方法
*   必须放在构造函数第一行
* */
public class Person {
    private String name;
    private int age;

    public Person(){
    }

    public Person(String name,int age){
        this.name = name;
        this.age = age;
    }

    public Person(String name){
        this(name,18);
        method(10);

    }

    public static void method(int i){
        System.out.println(i);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
